3.855 \(\int \frac{(A+B \tan (e+f x)) (c+d \tan (e+f x))}{(a+i a \tan (e+f x))^{3/2}} \, dx\)

Optimal. Leaf size=147 \[ -\frac{(B+i A) (c-i d) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (e+f x)}}{\sqrt{2} \sqrt{a}}\right )}{2 \sqrt{2} a^{3/2} f}+\frac{(-B+i A) (c+i d)}{3 f (a+i a \tan (e+f x))^{3/2}}+\frac{A (d+i c)+B (c+3 i d)}{2 a f \sqrt{a+i a \tan (e+f x)}} \]

[Out]

-((I*A + B)*(c - I*d)*ArcTanh[Sqrt[a + I*a*Tan[e + f*x]]/(Sqrt[2]*Sqrt[a])])/(2*Sqrt[2]*a^(3/2)*f) + ((I*A - B
)*(c + I*d))/(3*f*(a + I*a*Tan[e + f*x])^(3/2)) + (B*(c + (3*I)*d) + A*(I*c + d))/(2*a*f*Sqrt[a + I*a*Tan[e +
f*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.295479, antiderivative size = 147, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3590, 3526, 3480, 206} \[ -\frac{(B+i A) (c-i d) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (e+f x)}}{\sqrt{2} \sqrt{a}}\right )}{2 \sqrt{2} a^{3/2} f}+\frac{(-B+i A) (c+i d)}{3 f (a+i a \tan (e+f x))^{3/2}}+\frac{A (d+i c)+B (c+3 i d)}{2 a f \sqrt{a+i a \tan (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Int[((A + B*Tan[e + f*x])*(c + d*Tan[e + f*x]))/(a + I*a*Tan[e + f*x])^(3/2),x]

[Out]

-((I*A + B)*(c - I*d)*ArcTanh[Sqrt[a + I*a*Tan[e + f*x]]/(Sqrt[2]*Sqrt[a])])/(2*Sqrt[2]*a^(3/2)*f) + ((I*A - B
)*(c + I*d))/(3*f*(a + I*a*Tan[e + f*x])^(3/2)) + (B*(c + (3*I)*d) + A*(I*c + d))/(2*a*f*Sqrt[a + I*a*Tan[e +
f*x]])

Rule 3590

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((A*b - a*B)*(a*c + b*d)*(a + b*Tan[e + f*x])^m)/(2*a^2*f*m), x] + Dist[
1/(2*a*b), Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[A*b*c + a*B*c + a*A*d + b*B*d + 2*a*B*d*Tan[e + f*x], x], x],
 x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && EqQ[a^2 + b^2, 0]

Rule 3526

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*(a + b*Tan[e + f*x])^m)/(2*a*f*m), x] + Dist[(b*c + a*d)/(2*a*b), Int[(a + b*Tan[e + f*x])^(m + 1),
 x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0]

Rule 3480

Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[(-2*b)/d, Subst[Int[1/(2*a - x^2), x], x, Sq
rt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 + b^2, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(A+B \tan (e+f x)) (c+d \tan (e+f x))}{(a+i a \tan (e+f x))^{3/2}} \, dx &=\frac{(i A-B) (c+i d)}{3 f (a+i a \tan (e+f x))^{3/2}}-\frac{i \int \frac{a (B (c+i d)+A (i c+d))+2 a B d \tan (e+f x)}{\sqrt{a+i a \tan (e+f x)}} \, dx}{2 a^2}\\ &=\frac{(i A-B) (c+i d)}{3 f (a+i a \tan (e+f x))^{3/2}}+\frac{B (c+3 i d)+A (i c+d)}{2 a f \sqrt{a+i a \tan (e+f x)}}+\frac{((A-i B) (c-i d)) \int \sqrt{a+i a \tan (e+f x)} \, dx}{4 a^2}\\ &=\frac{(i A-B) (c+i d)}{3 f (a+i a \tan (e+f x))^{3/2}}+\frac{B (c+3 i d)+A (i c+d)}{2 a f \sqrt{a+i a \tan (e+f x)}}-\frac{(i (A-i B) (c-i d)) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (e+f x)}\right )}{2 a f}\\ &=-\frac{(i A+B) (c-i d) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (e+f x)}}{\sqrt{2} \sqrt{a}}\right )}{2 \sqrt{2} a^{3/2} f}+\frac{(i A-B) (c+i d)}{3 f (a+i a \tan (e+f x))^{3/2}}+\frac{B (c+3 i d)+A (i c+d)}{2 a f \sqrt{a+i a \tan (e+f x)}}\\ \end{align*}

Mathematica [A]  time = 5.31034, size = 206, normalized size = 1.4 \[ \frac{(A+B \tan (e+f x)) (c+d \tan (e+f x)) \left (\frac{2}{3} \cos (e+f x) ((A (d+5 i c)+B (c+7 i d)) \cos (e+f x)-3 (A c-i A d-i B c+3 B d) \sin (e+f x))-i (A-i B) (c-i d) e^{i (e+f x)} \sqrt{1+e^{2 i (e+f x)}} \sinh ^{-1}\left (e^{i (e+f x)}\right )\right )}{4 f (a+i a \tan (e+f x))^{3/2} (A \cos (e+f x)+B \sin (e+f x)) (c \cos (e+f x)+d \sin (e+f x))} \]

Antiderivative was successfully verified.

[In]

Integrate[((A + B*Tan[e + f*x])*(c + d*Tan[e + f*x]))/(a + I*a*Tan[e + f*x])^(3/2),x]

[Out]

(((-I)*(A - I*B)*(c - I*d)*E^(I*(e + f*x))*Sqrt[1 + E^((2*I)*(e + f*x))]*ArcSinh[E^(I*(e + f*x))] + (2*Cos[e +
 f*x]*((B*(c + (7*I)*d) + A*((5*I)*c + d))*Cos[e + f*x] - 3*(A*c - I*B*c - I*A*d + 3*B*d)*Sin[e + f*x]))/3)*(A
 + B*Tan[e + f*x])*(c + d*Tan[e + f*x]))/(4*f*(A*Cos[e + f*x] + B*Sin[e + f*x])*(c*Cos[e + f*x] + d*Sin[e + f*
x])*(a + I*a*Tan[e + f*x])^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.074, size = 131, normalized size = 0.9 \begin{align*}{\frac{-2\,i}{af} \left ( -{ \left ( -{\frac{i}{4}}Ad-{\frac{i}{4}}Bc+{\frac{Ac}{4}}+{\frac{3\,Bd}{4}} \right ){\frac{1}{\sqrt{a+ia\tan \left ( fx+e \right ) }}}}-{\frac{a \left ( -Bd+iAd+iBc+Ac \right ) }{6} \left ( a+ia\tan \left ( fx+e \right ) \right ) ^{-{\frac{3}{2}}}}-{\frac{\sqrt{2}}{2} \left ({\frac{i}{4}}Ad+{\frac{i}{4}}Bc-{\frac{Ac}{4}}+{\frac{Bd}{4}} \right ){\it Artanh} \left ({\frac{\sqrt{2}}{2}\sqrt{a+ia\tan \left ( fx+e \right ) }{\frac{1}{\sqrt{a}}}} \right ){\frac{1}{\sqrt{a}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*tan(f*x+e))*(c+d*tan(f*x+e))/(a+I*a*tan(f*x+e))^(3/2),x)

[Out]

-2*I/f/a*(-(-1/4*I*A*d-1/4*I*B*c+1/4*A*c+3/4*B*d)/(a+I*a*tan(f*x+e))^(1/2)-1/6*a*(-B*d+I*A*d+I*B*c+A*c)/(a+I*a
*tan(f*x+e))^(3/2)-1/2*(1/4*I*A*d+1/4*I*B*c-1/4*A*c+1/4*B*d)*2^(1/2)/a^(1/2)*arctanh(1/2*(a+I*a*tan(f*x+e))^(1
/2)*2^(1/2)/a^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c+d*tan(f*x+e))/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 1.74103, size = 1629, normalized size = 11.08 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c+d*tan(f*x+e))/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

-1/12*(3*sqrt(1/2)*a^2*f*sqrt(-((A^2 - 2*I*A*B - B^2)*c^2 - (2*I*A^2 + 4*A*B - 2*I*B^2)*c*d - (A^2 - 2*I*A*B -
 B^2)*d^2)/(a^3*f^2))*e^(4*I*f*x + 4*I*e)*log(-(2*I*sqrt(1/2)*a^2*f*sqrt(-((A^2 - 2*I*A*B - B^2)*c^2 - (2*I*A^
2 + 4*A*B - 2*I*B^2)*c*d - (A^2 - 2*I*A*B - B^2)*d^2)/(a^3*f^2))*e^(2*I*f*x + 2*I*e) - sqrt(2)*((A - I*B)*c -
(I*A + B)*d + ((A - I*B)*c - (I*A + B)*d)*e^(2*I*f*x + 2*I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*e^(I*f*x + I*
e))*e^(-I*f*x - I*e)/((A - I*B)*c - (I*A + B)*d)) - 3*sqrt(1/2)*a^2*f*sqrt(-((A^2 - 2*I*A*B - B^2)*c^2 - (2*I*
A^2 + 4*A*B - 2*I*B^2)*c*d - (A^2 - 2*I*A*B - B^2)*d^2)/(a^3*f^2))*e^(4*I*f*x + 4*I*e)*log(-(-2*I*sqrt(1/2)*a^
2*f*sqrt(-((A^2 - 2*I*A*B - B^2)*c^2 - (2*I*A^2 + 4*A*B - 2*I*B^2)*c*d - (A^2 - 2*I*A*B - B^2)*d^2)/(a^3*f^2))
*e^(2*I*f*x + 2*I*e) - sqrt(2)*((A - I*B)*c - (I*A + B)*d + ((A - I*B)*c - (I*A + B)*d)*e^(2*I*f*x + 2*I*e))*s
qrt(a/(e^(2*I*f*x + 2*I*e) + 1))*e^(I*f*x + I*e))*e^(-I*f*x - I*e)/((A - I*B)*c - (I*A + B)*d)) - sqrt(2)*((I*
A - B)*c - (A + I*B)*d + ((4*I*A + 2*B)*c + 2*(A + 4*I*B)*d)*e^(4*I*f*x + 4*I*e) + ((5*I*A + B)*c + (A + 7*I*B
)*d)*e^(2*I*f*x + 2*I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*e^(I*f*x + I*e))*e^(-4*I*f*x - 4*I*e)/(a^2*f)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c+d*tan(f*x+e))/(a+I*a*tan(f*x+e))**(3/2),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (f x + e\right ) + A\right )}{\left (d \tan \left (f x + e\right ) + c\right )}}{{\left (i \, a \tan \left (f x + e\right ) + a\right )}^{\frac{3}{2}}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e))*(c+d*tan(f*x+e))/(a+I*a*tan(f*x+e))^(3/2),x, algorithm="giac")

[Out]

integrate((B*tan(f*x + e) + A)*(d*tan(f*x + e) + c)/(I*a*tan(f*x + e) + a)^(3/2), x)